package com.jxdinfo.hussar.base.cloud.feign;

import com.jxdinfo.hussar.platform.core.base.apiresult.ApiResponse;
import com.jxdinfo.hussar.platform.core.support.service.dto.LoginUser;
import com.jxdinfo.hussar.platform.core.support.service.dto.UserDetails;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(contextId = "RemoteUserDetailsService", value = "${hussar-remote-server.base.name:hussar-web}",
        url = "${hussar-remote-server.base.url:}")
public interface RemoteUserDetailService {

    /***
     * 获取user详细信息 主要是登录的时候使用
     * */
    @PostMapping("/cloudUser/getLoginUserByAccount")
    ApiResponse<UserDetails> doLoingByUserName(@RequestBody LoginUser loginUser);

    @GetMapping("/cloudUser/checkUserPassword")
    ApiResponse<Boolean> doCheckUserPassword(@RequestParam("password") String password);
}
